package net.xxcxcxcx.xc_enhancedmob.register.client;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
import net.minecraft.client.render.entity.FlyingItemEntityRenderer;
import net.xxcxcxcx.xc_enhancedmob.render.entity.SaveFireworkEntityRenderer;

import static net.xxcxcxcx.xc_enhancedmob.register.EntityRegister.SaveFireballEntityType;
import static net.xxcxcxcx.xc_enhancedmob.register.EntityRegister.SaveFireworkRocketType;

@Environment(value = EnvType.CLIENT)
public class RenderRegistry {
    @Environment(value = EnvType.CLIENT)
    public static void Registry() {
        EntityRendererRegistry.INSTANCE.register(SaveFireballEntityType, (ma, context) ->
                new FlyingItemEntityRenderer(ma, context.getItemRenderer(), 3.0f, true));
        EntityRendererRegistry.INSTANCE.register(SaveFireworkRocketType, (ma, context) ->
                new SaveFireworkEntityRenderer(ma, context.getItemRenderer()));
    }
}
